<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<title>用户关系管理表</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- 确保适当的绘制和触屏缩放 -->
	<link rel="stylesheet" href="{$url_css}bootstrap.min.css" type="text/css">
	<link rel="stylesheet" href="{$url_css}admin.css" type="text/css">
	<link rel="stylesheet" href="{$url_css}viewer.min.css" type="text/css"/>

	<script type="text/javascript" src="{$url_js}jquery-2.2.0.min.js"></script>
	<script type="text/javascript" src="{$url_js}jquery-1.12.0.min.js"></script>
	<script type="text/javascript" src="{$url_js}calendar/WdatePicker.js"></script>
	<script type="text/javascript" src="{$url_js}viewer-jquery.min.js"></script>
	<style type="text/css">
		{literal}
		.page_info div {
			display: inline-block;
		}

		.page_info .p_l {
			color: #666;
			float: left;
			line-height: 69px;
			font-size: 16px;
		}

		.page_info .p_r {
			color: #337AB7;
			float: right;
		}

		{/literal}
	</style>
</head>
<body>
<div class="container" style="width: 96%">
	<table class="table table-bordered table-striped" align="center">
		<tr>
			<td colspan="4">
				<nav class="navbar navbar-default">
					<div class="navbar-header">
						<span class="navbar-brand">邀请用户信息</span>
					</div>
				</nav>
			</td>
		</tr>

		{if $info}
			<tr>
				<td align="center" style="width: 100px">UserId</td>
				<td align="center" style="width: 100px">姓名</td>
				<td align="center" style="width: 150px">手机</td>
				<td align="center" style="width: 150px">创建时间</td>
			</tr>
			<tr>
				<td align="center">{$info['UserId']}</td>
				<td align="center">{$info['NickName']}</td>
				<td align="center">{$info['Mobile']}</td>
				<td align="center">{$info['CreateTime']}</td>
			</tr>
		{/if}
	</table>
	<table class="table table-bordered table-striped" align="center">
		<tr >
			<td colspan="4">
				<nav class="navbar navbar-default">
					<div class="navbar-header">
						<span class="navbar-brand">被其邀请用户信息</span>
					</div>
				</nav>
			</td>
		</tr>
		{if $list}
			<tr>
				<td align="center" style="width: 100px">UserId</td>
				<td align="center" style="width: 150px">创建时间</td>
				<td align="center" style="width: 150px">修改时间</td>
				<td align="center" style="width: 150px">状态</td>
			</tr>

			{foreach $list as $v}
			<tr>
				<td align="center">{$v['UserId']}</td>
				<td align="center">{$v['CreateTime']}</td>
				<td align="center">{$v['UpdateTime']}</td>
				<td align="center">{if $v.Status == 1}已支付{elseif $v.Status == 2}完成绑定{else}未支付{/if}</td>
			</tr>
			{/foreach}
		{/if}
	</table>
</div>

<script type="text/javascript">
	{literal}
    $('.img').viewer();


    //hot设置
    $(".hot").each(function () {
        var _this = $(this);
        $(this).hover(function () {
            if (_this.attr('data') == 1) {
                _this.val('隐藏');
            } else {
                _this.val('正常');
            }
        }, function () {
            if (_this.attr('data') == 1) {
                _this.val('正常');
            } else {
                _this.val('隐藏');
            }
        });

        $(this).click(function () {
            $.ajax({
                url: 'templeItem.php?do=Status',
                type: "POST",
                dataType: "json",
                data: {aid: $(this).attr('data_id'),sid:$(this).attr('data')},
                success: function (json) {
                    if (json.type == 'yes') {
                        _this.attr('data', json.rel);
                        if (json.rel == 1) {
                            _this.val('正常');
                        } else {
                            _this.val('隐藏');
                        }
                        top.swal('操作成功！', '成功！', 'success')
                    } else {
                        top.swal('操作失败！', '还有机会！', 'error')
                    }
                }
            });
        });
    });

	{/literal}
</script>

</body>
</html>